package com.kgc.xsProvider.controller;

import com.kgc.basic.util.ResponseMsg;
import com.kgc.xs.pojo.SalesReturn;
import com.kgc.xs.remote.SalesReturnRemote;
import com.kgc.xsProvider.service.SalesReturnService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;


@Controller
public class SalesReturnController implements SalesReturnRemote {

    private Logger logger = LoggerFactory.getLogger(SalesReturnController.class);

    @Autowired
    private SalesReturnService salesReturnService;




    @Override
    public ResponseMsg selectSalesReturnByPage(Map<String, Object> map) {
        logger.info("SalesReturnController selectSalesReturnByPage params is{}",map.toString());
        ResponseMsg responseMsg = salesReturnService.selectSalesReturnByPage(map);
        logger.info("SalesReturnController selectSalesReturnByPage responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg insertSalesReturn(Map<String, Object> map) {
        logger.info("SalesReturnController insertSalesReturn params is{}",map.toString());
        ResponseMsg responseMsg = salesReturnService.insertSalesReturn(map);
        logger.info("SalesReturnController insertSalesReturn responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg updateSalesReturn(Map<String, Object> map) {
        logger.info("SalesReturnController updateSalesReturn params is{}",map.toString());
        ResponseMsg responseMsg = salesReturnService.updateSalesReturn(map);
        logger.info("SalesReturnController updateSalesReturn responseMsg is{}",map.toString());
        return responseMsg;
    }


    @Override
    public ResponseMsg deleteSalesReturn(Map<String, Object> map) {
        logger.info("SalesReturnController deleteSalesReturn params is{}",map.toString());
        ResponseMsg responseMsg = salesReturnService.deleteSalesReturn(map);
        logger.info("SalesReturnController deleteSalesReturn responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesReturnDetail(Map<String, Object> map) {
        logger.info("SalesReturnController selectSalesReturnDetail params is{}",map.toString());
        ResponseMsg responseMsg = salesReturnService.selectSalesReturnDetail(map);
        logger.info("SalesReturnController selectSalesReturnDetail responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg checkSalesReturn(Map<String, Object> map) {
        logger.info("SalesReturnController checkSalesReturn params is{}",map);
        ResponseMsg responseMsg = salesReturnService.checkSalesReturn(map);
        logger.info("SalesReturnController checkSalesReturn responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesReturnByCode(String docCode) {
        logger.info("SalesReturnController selectSalesReturnByCode params is{}",docCode);
        ResponseMsg responseMsg = salesReturnService.selectSalesReturnByCode(docCode);
        logger.info("SalesReturnController selectSalesReturnByCode responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }

    @Override
    public ResponseMsg selectSalesReturnDetailByCode(String xsReturnCode) {
        logger.info("SalesReturnController selectSalesReturnDetailByCode params is{}",xsReturnCode);
        ResponseMsg responseMsg = salesReturnService.selectSalesReturnDetailByCode(xsReturnCode);
        logger.info("SalesReturnController selectSalesReturnDetailByCode responseMsg is{}",responseMsg.toString());
        return responseMsg;
    }
}
